<template>
  <div class="editor">
    <header>
      <i class="icon iconfont icon-back" @click="back"></i>
      <div class="text">{{this.$route.params.editorName}}</div>
      <div class="box"></div>
    </header>
    <div class="html-content" v-html="this.data"></div>
  </div>
</template>
<script>
  import axios from 'axios';
  export default {
    data() {
      return {
        data: '',
        html: ''
      }
    },
    created() {
      this.getData();
    },
    methods: {
      // 获取指定的编辑信息
      getData() {
        axios.get('api/editor/' + this.$route.params.editorId + '/profile-page/ios')
          .then(res => {
            res.data = res.data;
            this.data = res.data;
          });
      },
      back() {
        this.$router.go(-1);
      }
    }
  }

</script>
<style lang="less" scoped>
header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    height: 40px;
    line-height: 40px;
    font-size: 20px;
    color: #fff;
    background: #1ba3ea;
    .icon-back {
        height: 100%;
        font-size: 26px;
        padding: 0 15px;
    }
    .text {
        height: 100%;
    }
    .box {
        height: 100%;
        width: 56px;
    }
}


</style>
